-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: net.Server.listen()
avoid operations on null
when fail
#23920
Conversation
When `net.Server` fails to create a new handle, an error shall be emitted in the next tick. Therefore, we make `net.Server.listen()` directly return to avoid following operations on `null` `this._handle`. Fixes: nodejs#23917
Tests failed seems unrelated. |
No, the test failures on Windows are definitely related:
|
@richardlau Yes. Sorry for the negligence, will look into this. |
Although I don't have a windows desktop on hand until the day after tomorrow, I have updated the test to make it emit an "EADDRINUSE" error explicitly. Hopefully it will work on windows. @richardlau Thanks again for the reminding. |
Landed in 3458e65 |
When `net.Server` fails to create a new handle, an error shall be emitted in the next tick. Therefore, we make `net.Server.listen()` directly return to avoid following operations on `null` `this._handle`. Fixes: nodejs#23917 PR-URL: nodejs#23920 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
When `net.Server` fails to create a new handle, an error shall be emitted in the next tick. Therefore, we make `net.Server.listen()` directly return to avoid following operations on `null` `this._handle`. Fixes: #23917 PR-URL: #23920 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
When `net.Server` fails to create a new handle, an error shall be emitted in the next tick. Therefore, we make `net.Server.listen()` directly return to avoid following operations on `null` `this._handle`. Fixes: #23917 PR-URL: #23920 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
When `net.Server` fails to create a new handle, an error shall be emitted in the next tick. Therefore, we make `net.Server.listen()` directly return to avoid following operations on `null` `this._handle`. Fixes: #23917 PR-URL: #23920 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
When `net.Server` fails to create a new handle, an error shall be emitted in the next tick. Therefore, we make `net.Server.listen()` directly return to avoid following operations on `null` `this._handle`. Fixes: #23917 PR-URL: #23920 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
When
net.Server
fails to create a new handle, an error shall be emitted in the next tick. Therefore, we makenet.Server.listen()
directly return to avoid following operations onnull
this._handle
.Fixes: #23917
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes